package com.vision.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.vision.pojo.entity.Permission;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @projectName: vision
 * @package: com.vision.pojo.vo
 * @className: ChatListVO
 * @author: escapeicon@gmail.com
 * @description: 用户信息 VO
 * @date: 2024/1/20 9:59
 * @version: 1.0
 */
@Data
public class UserInfoVO {
    @NotNull
    private Integer id;
    @NotEmpty
    private String username;
    @Pattern(regexp="^\\S{1,20}$")
    private String nickname;
    private Character gender;
    @Pattern(regexp="^1[3456789]\\d{9}$")
    private String phone;
    @Email
    private String email;
    private String avatar;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    private String description;
    private Integer fansCount;
    private String roleName;
    private Integer isSubscribed;
}
